/**
 * 
 */
package model.core.torneo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Giuseppe Fusco (fusgius@gmail.com)
 * @param <T>
 *
 */
public abstract class AbstractContainer<T> implements Container<T> {

	private List<T> container;

	public AbstractContainer(){
		container = new ArrayList<T>();
	}
	
	public boolean add(T c){
		return container.add(c);
	}

	public boolean remove(T c){
		return container.remove(c);
	}

	public List<T> getAll() {
		return container;
	}

	@SuppressWarnings("unchecked")
	public void setAll(List<? extends T> cont) {
		this.container = (ArrayList<T>) cont;
	}

	public void removeAll(){
		container.removeAll(container);
	}
	
	public T getAtPosition(int position) {
		// TODO Auto-generated method stub
		return container.get(position);
	}
	
	public int getSize() {
		// TODO Auto-generated method stub
		return container.size();
	}
	
	public void ordina() {
		// TODO Auto-generated method stub
		
	}
}
